From: kaf24@firebug.cl.cam.ac.uk Date: Thu, 12 Jan 2006 13:27:20 +0000 (+0100) Subject: Adds a check to vtpm_manager and vtpm Makefiles to verify openssl and X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~16541^2~60 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success//%22http:/www.example.com/cgi/success/?a=commitdiff_plain;h=71e8ec899aed517e21f359d6f06ab86244179479;p=xen.git Adds a check to vtpm_manager and vtpm Makefiles to verify openssl and gmp dev files are installed. If files are missing, Makefile exits with a message indicating that these tools will not be built, rather than an error, which prevents Xen from building. Signed-off-by: Vinnie Scarlata --- diff --git a/tools/vtpm/Makefile b/tools/vtpm/Makefile index a1c8aa6438..8224a9d304 100644 --- a/tools/vtpm/Makefile +++ b/tools/vtpm/Makefile @@ -11,6 +11,8 @@ VTPM_DIR = vtpm # Emulator tarball name TPM_EMULATOR_TARFILE = tpm_emulator-0.2b.tar.gz +GMP_HEADER = /usr/include/gmp.h + all: build build: $(TPM_EMULATOR_DIR) $(VTPM_DIR) build_sub @@ -55,5 +57,12 @@ $(VTPM_DIR): $(TPM_EMULATOR_TARFILE) patch -p1 <../vtpm.patch build_sub: - $(MAKE) -C $(TPM_EMULATOR_DIR) - $(MAKE) -C $(VTPM_DIR) + if [ -e $(GMP_HEADER) ]; then \ + $(MAKE) -C $(VTPM_DIR); \ + if [ "$(BUILD_EMULATOR)" = "y" ]; then \ + $(MAKE) -C $(TPM_EMULATOR_DIR); \ + fi \ + else \ + echo "*** Unable to build VTPMs. libgmp could not be found."; \ + fi + diff --git a/tools/vtpm/Rules.mk b/tools/vtpm/Rules.mk index e840df141f..93b84cdaa5 100644 --- a/tools/vtpm/Rules.mk +++ b/tools/vtpm/Rules.mk @@ -33,5 +33,7 @@ $(OBJS): $(SRCS) -include $(DEP_FILES) +BUILD_EMULATOR = n + # Make sure these are just rules .PHONY : all build install clean diff --git a/tools/vtpm_manager/Makefile b/tools/vtpm_manager/Makefile index dddfa5160b..16825a2279 100644 --- a/tools/vtpm_manager/Makefile +++ b/tools/vtpm_manager/Makefile @@ -4,13 +4,18 @@ XEN_ROOT = ../.. include $(XEN_ROOT)/tools/vtpm_manager/Rules.mk SUBDIRS = crypto tcs util manager +OPENSSL_HEADER = /usr/include/openssl/crypto.h all: build build: - @set -e; for subdir in $(SUBDIRS); do \ - $(MAKE) -C $$subdir $@; \ - done + if [ -e $(OPENSSL_HEADER) ]; then \ + @set -e; for subdir in $(SUBDIRS); do \ + $(MAKE) -C $$subdir $@; \ + done; \ + else \ + echo "*** Cannot build vtpm_manager: OpenSSL developement files missing."; \ + fi install: build @set -e; for subdir in $(SUBDIRS); do \